<template>
  <el-link v-for="link in links" :underline="false" :href="link.href" :key="link.name" target="_blank" class="link">
    <div class="web-page-module-link-card">
      <img class="web-page-module-link-team-card-icon" v-lazy="link.logoUrl" :alt="link.name" />
    </div>
  </el-link>
</template>

<script lang="ts" setup>
import { defineProps, PropType } from 'vue'
type Link = {
  name: string;
  href: string;
  logoUrl: string;
};
defineProps({
  links: {
    type: Array as unknown as PropType<[Link]>,
    default: () => []
  }
})
</script>
<style lang="scss" scoped>
.web-page-module-link-card {
  position: relative;
  padding: 10px;
  float: left;
  margin-right: 20px;
  margin-bottom: 10px;
  overflow: hidden;

  .web-page-module-link-team-card-icon {
    position: relative;
    float: left;
    width: 40px;
    height: 40px;
    border-radius: 100px;
    border: 1px solid white;
    padding: 2px;
    box-shadow: 0px 0px 3px #bcbbbb;
  }
}

@media screen and (max-width: 480px) {
  .link {
    width: 20%;
    overflow: hidden;

    ::v-deep .el-link__inner {
      width: 100%;
    }

    .web-page-module-link-card {
      overflow: visible;
    }
  }
}
</style>
